package com.proba.annotations.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * <p>Pojo mapping TABLE MAVROVO.SOSTOJBA_NA_MATERIJALI</p>
 *
 * <p>Generated at Mon May 10 22:57:47 CEST 2010</p>
 * @author Salto-db Generator v1.0.16 / EJB3
 * 
 */
@Entity
@Table(name = "SOSTOJBA_NA_MATERIJALI", schema = "MAVROVO")
@SuppressWarnings("serial")
@javax.persistence.SequenceGenerator(
    name="sostojba_na_materijali_seq",
    sequenceName="sostojba_na_materijali_seq", allocationSize=1
)
public class SostojbaNaMaterijali implements Serializable {

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SostojbaNaMaterijali other = (SostojbaNaMaterijali) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	/**
	 * Attribute id.
	 */
	private Long id;
	
	/**
	 * Attribute datum.
	 */
	private Date datum;
	
	/**
	 * Attribute proizvodenPogon
	 */
	 private ProizvodenPogon proizvodenPogon;	

	/**
	 * Attribute potrosenMaterijal
	 */
	 private PotrosenMaterijal potrosenMaterijal;	

	/**
	 * Attribute primeno.
	 */
	private Double primeno;
	
	/**
	 * Attribute potroseno.
	 */
	private Double potroseno;
	
	/**
	 * Attribute komentar.
	 */
	private String komentar;
	
	
	/**
	 * @return id
	 */
	@Basic
	@Id
	@Column(name = "ID")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="sostojba_na_materijali_seq")
		public Long getId() {
		return id;
	}

	/**
	 * @param id new value for id 
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * @return datum
	 */
	@Basic
	@Column(name = "DATUM")
		public Date getDatum() {
		return datum;
	}

	/**
	 * @param datum new value for datum 
	 */
	public void setDatum(Date datum) {
		this.datum = datum;
	}
	
	/**
	 * get proizvodenPogon
	 */
	@ManyToOne
	@JoinColumn(name = "PROIZVODEN_POGON")
	public ProizvodenPogon getProizvodenPogon() {
		return this.proizvodenPogon;
	}
	
	/**
	 * set proizvodenPogon
	 */
	public void setProizvodenPogon(ProizvodenPogon proizvodenPogon) {
		this.proizvodenPogon = proizvodenPogon;
	}

	/**
	 * get potrosenMaterijal
	 */
	@ManyToOne
	@JoinColumn(name = "POTROSEN_MATERIJAL")
	public PotrosenMaterijal getPotrosenMaterijal() {
		return this.potrosenMaterijal;
	}
	
	/**
	 * set potrosenMaterijal
	 */
	public void setPotrosenMaterijal(PotrosenMaterijal potrosenMaterijal) {
		this.potrosenMaterijal = potrosenMaterijal;
	}

	/**
	 * @return primeno
	 */
	@Basic
	@Column(name = "PRIMENO")
		public Double getPrimeno() {
		return primeno;
	}

	/**
	 * @param primeno new value for primeno 
	 */
	public void setPrimeno(Double primeno) {
		this.primeno = primeno;
	}
	
	/**
	 * @return potroseno
	 */
	@Basic
	@Column(name = "POTROSENO")
		public Double getPotroseno() {
		return potroseno;
	}

	/**
	 * @param potroseno new value for potroseno 
	 */
	public void setPotroseno(Double potroseno) {
		this.potroseno = potroseno;
	}
	
	/**
	 * @return komentar
	 */
	@Basic
	@Column(name = "KOMENTAR", length = 200)
		public String getKomentar() {
		return komentar;
	}

	/**
	 * @param komentar new value for komentar 
	 */
	public void setKomentar(String komentar) {
		this.komentar = komentar;
	}

}